Skip to content

RDKEMW-11440 : [RDKE][Xumo]"btMgrBus" process crash is observed#44

Open
tharun-kumarv wants to merge 4 commits intodevelopfrom
feature/test--RDKEMW-11440
Open

RDKEMW-11440 : [RDKE][Xumo]"btMgrBus" process crash is observed#44
tharun-kumarv wants to merge 4 commits intodevelopfrom
feature/test--RDKEMW-11440

Conversation

@tharun-kumarv
Copy link
Contributor

Reason for change: dbus crash due to invalid path.
Test Procedure: Check Ticket description.
Risks: Low
Priority: P1

Reason for change: dbus crash due to invalid path.
Test Procedure: Check Ticket Description.
Risks: Low
Priority: P1
Reason for change: dbus crash due to invalid path.
Test Procedure: Check description
Risks: Low
Priority: P1
@tharun-kumarv tharun-kumarv requested a review from a team as a code owner March 3, 2026 09:44
Copilot AI review requested due to automatic review settings March 3, 2026 09:44
@github-actions
Copy link

github-actions bot commented Mar 3, 2026


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent btMgrBus crashes caused by passing an invalid D-Bus object path into BlueZ/libdbus calls by adding object-path validation before issuing a GetAll properties method call.

Changes:

  • Updates and relocates btrCore_IsPathValid (now takes const char*) and adds NULL/format checks.
  • Adds a path validity check for apcBtOpIfcePath in BtrCore_BTGetProp before creating the D-Bus method call.
Comments suppressed due to low confidence (1)

src/bt-ifce/btrCore_dbus_bluez5.c:3919

  • After adding the path check, dbus_message_new_method_call(...) is still used without verifying the returned lpDBusMsg is non-NULL. If the path is invalid (or allocation fails), the subsequent dbus_message_append_args will dereference NULL and crash. Please add a NULL check here (as is done in other functions in this file) and return an error if message creation fails.
    lpDBusMsg = dbus_message_new_method_call(BT_DBUS_BLUEZ_PATH,
                                             apcBtOpIfcePath,
                                             DBUS_INTERFACE_PROPERTIES,
                                             "GetAll");

    dbus_message_append_args(lpDBusMsg, DBUS_TYPE_STRING, &pInterface, DBUS_TYPE_INVALID);


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3908 to +3911
if (!btrCore_IsPathValid(apcBtOpIfcePath)) {
BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n");
return -1;
}
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The newly added apcBtOpIfcePath validation block uses tab indentation, while the surrounding code uses spaces. Please reformat this block to match the file’s existing indentation to keep diffs consistent and improve readability.

Suggested change
if (!btrCore_IsPathValid(apcBtOpIfcePath)) {
BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n");
return -1;
}
if (!btrCore_IsPathValid(apcBtOpIfcePath)) {
BTRCORELOG_ERROR("Invalid apcBtOpIfcePath\n");
return -1;
}

Copilot uses AI. Check for mistakes.
Reason for change: dbus crash due to invalid path.
Test Procedure: Check Ticket description.
Risks: Low
Priority: P1
Copilot AI review requested due to automatic review settings March 3, 2026 10:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants